﻿using FriendAnalyzer.Infrastructure.MachineLearning.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FriendAnalyzer.Infrastructure.MachineLearning.Analysis
{
    public class FacebookDataAnalyzer
    {
        #region Singleton Definition

        private static readonly Lazy<FacebookDataAnalyzer> _instance = new Lazy<FacebookDataAnalyzer>(() => new FacebookDataAnalyzer());

        private FacebookDataAnalyzer() { }

        public static FacebookDataAnalyzer Instance
        {
            get { return _instance.Value; }
        }

        #endregion

        public FacebookUserClassifier GetUserClassifier(UserFeatures[] database, uint leaderCount, double accuracy, double fuzzyness, double maxStepCount, bool tryAvoidLocalOptimum)
        {
            return FacebookUserClassifierFactory.Instance.Create(database, leaderCount, accuracy, fuzzyness, maxStepCount, tryAvoidLocalOptimum);
        }
    }
}